#include<bits/stdc++.h>
using namespace std;
inline int read()
{
    int s=0;
    char ch=getchar(),last=' ';
    while(ch<'0'||ch>'9')
        last=ch,ch=getchar();
    while(ch>='0'&&ch<='9')
        s=(s<<1)+(s<<3)+(ch^48),ch=getchar();
    return last=='-'?-s:s;
}
void write(int x)
{
    if(!x)
        putchar('0');
    char F[200];
    int tmp=x>0?x:-x;
    if(x<0)
        putchar('-');
    int cnt=0;
    while(tmp>0)
        F[cnt++]=tmp%10+'0',tmp/=10;
    while(cnt>0)
        putchar(F[--cnt]);
}
mt19937 Rnd(time(0));
typedef struct{
	int ls,rs,key;
	int val,tag_c,tag_a,siz;
}Tree;
Tree t[100011];
void Cver(int p,int k)
{
	t[p].val = t[p].tag_c = k,t[p].tag_a = 0;
}
void Add(int p,int k)
{
	t[p].val += k,t[p].tag_a += k;
}
void push_down(int p)
{
	if(t[p].tag_c)
	{
		if(t[p].ls)
			Cver(t[p].ls,t[p].tag_c);
		if(t[p].rs)
			Cver(t[p].rs,t[p].tag_c);
		t[p].tag_c = 0;
	}
	if(t[p].tag_a)
	{
		if(t[p].ls)
			Add(t[p].ls,t[p].tag_a);
		if(t[p].rs)
			Add(t[p].rs,t[p].tag_a);
		t[p].tag_a = 0;
	}
}
void push_up(int p)
{
	t[p].siz = t[t[p].ls].siz + 1 + t[t[p].rs].siz;
}
void split(int p,int k,int& l,int& r)
{
	if(!p)
		return l = r = 0,void();
	if(t[p].val <= k)
		return l = p,push_down(p),split(t[p].rs,k,t[p].rs,r),push_up(p);
	return r = p,push_down(p),split(t[p].ls,k,l,t[p].ls),push_up(p);
}
int merge(int x,int y)
{
	if(!x || !y)
		return (x | y);
	if(t[x].key < t[y].key)
		return push_down(x),t[x].rs = merge(t[x].rs,y),push_up(x),x;
	return push_down(y),t[y].ls = merge(x,t[y].ls),push_up(y),y;
}
void Insert(int& p,int x)
{
	int L,R;
	split(p,t[x].val,L,R);
	p = merge(merge(L,x),R);
}
void Cover(int& p,int l,int r)
{
	int L,M,R;
	split(p,r,L,R);
	split(L,l - 1,L,M);
	Cver(M,r);
	p = merge(merge(L,M),R);
}
int lst[100011],cnt;
void Break(int p)
{
	if(!p)
		return;
	push_down(p);
	lst[++cnt] = p;
	Break(t[p].ls),Break(t[p].rs);
	t[p].ls = t[p].rs = 0,t[p].siz = 1;
}
int n,m,q;
vector<int> v[100011];
int deep[100011];
int ans[100011];
set<pair<pair<int,int>,int> > st[100011];
int root[100011],dui[100011];
void Merge(int x,int y)
{
	int dp = deep[x];
	if(t[root[x]].siz + st[dui[x]].size() < t[root[y]].siz + st[dui[y]].size())
		swap(root[x],root[y]),swap(dui[x],dui[y]);
//	if(t[root[x]].siz || t[root[y]].siz)
//	{
//		cerr << "\n";
//		cerr << dp << ":\n";
//		for(auto i:st[dui[x]])
//			cerr << i.first.first << "-" << i.first.second << " " << i.second - dp << "\n";
//		cerr << "---------\n";
//		for(auto i:st[dui[y]])
//			cerr << i.first.first << "-" << i.first.second << " " << i.second - dp << "\n";
//		cerr << "\n";
//	}
	for(auto i:st[dui[y]])
	{
		int l = i.first.first,r = i.first.second;
		l += i.second - dp,r -= i.second - dp;
		if(l >= r)
			continue;
		bool flag = 1;
		while(flag)
		{
			flag = 0;
			auto j = st[dui[x]].lower_bound({{l,0},0});
			if(j != st[dui[x]].end())
			{
				if((*j).first.first <= r)
				{
					flag = 1;
					if((*j).second != dp)
					{
						int nl = (*j).first.first + ((*j).second - dp),nr = (*j).first.second - ((*j).second - dp);
						st[dui[x]].erase(j);
						if(nl < nr) st[dui[x]].insert({{nl,nr},dp});
						continue;
					}
					r = max(r,(*j).first.second);
					st[dui[x]].erase(j);
					continue;
				}
			}
			if(j != st[dui[x]].begin())
			{
				j--;
				if((*j).first.second >= l)
				{
					flag = 1;
					if((*j).second != dp)
					{
						int nl = (*j).first.first + ((*j).second - dp),nr = (*j).first.second - ((*j).second - dp);
						st[dui[x]].erase(j);
						if(nl < nr) st[dui[x]].insert({{nl,nr},dp});
						continue;
					}
					l = min(l,(*j).first.first);
					st[dui[x]].erase(j);
					continue;
				}
			}
		}
		Cover(root[x],l,r);
		st[dui[x]].insert({{l,r},dp});
//		if(t[root[x]].siz || t[root[y]].siz)
//			cerr << dp << " " << i.first.first + (i.second - dp) << '-' << i.first.second - (i.second - dp) << "->" << l << "-" << r << "\n";
	}
	cnt = 0,Break(root[y]);
	while(cnt)
	{
		int& val = t[lst[cnt]].val;
		auto i = st[dui[x]].lower_bound({{val + 1,0},0});
		if(i != st[dui[x]].begin())
		{
			i--;
			int l = (*i).first.first + ((*i).second - dp),r = (*i).first.second - ((*i).second - dp);
//			cerr << val << ' ' << l << ' ' << r << '\n';
			if(l <= val && val <= r)
				val = r;
		}
		Insert(root[x],lst[cnt--]);
	}
}
void DFS1(int p,int fa)
{
	deep[p] = deep[fa] + 1;
	for(auto i:v[p]) if(i != fa)
		DFS1(i,p);
}
void DFS(int p,int fa)
{
	for(auto i:v[p]) if(i != fa)
		DFS(i,p),Merge(p,i);
	int W;
	split(root[p],0,W,root[p]);
	cnt = 0,Break(W);
	while(cnt)
		ans[lst[cnt--]] = deep[p];
//	cerr << p << " " << t[1].val << '\n';
	Add(root[p],-1);
}
typedef struct{
	int x,y,p;
}QUES;
QUES ques[100011];
int d[100011];
int main()
{
	freopen("shu.in","r",stdin);
	freopen("shu.out","w",stdout);
	n = read(),m = read(),q = read();
	for(int i = 1;i < n;i++)
	{
		int x,y;
		x = read(),y = read();
		v[x].push_back(y),v[y].push_back(x);
	}
	for(int i = 1;i <= q;i++)
	{
		ques[i].x = read(),ques[i].y = read(),ques[i].p = read();
		t[i].val = ques[i].p,t[i].key = Rnd(),t[i].siz = 1;
		Insert(root[ques[i].x],i);
	}
	for(int i = 1;i <= n;i++)
		dui[i] = i;
	DFS1(1,1);
	for(int i = 1;i <= m;i++)
	{
		int x,y;
		cin >> x >> y;
		d[x] = max(d[x],y);
	}
	for(int i = 1;i <= n;i++) if(d[i])
		st[i].insert({{0,d[i]},deep[i]}),Cover(root[i],0,d[i]);
//	cerr << deep[ques[4].x] << '\n';
//	cerr << t[4].val << "\n";
	DFS(1,1);
//	cerr << ans[4] << "\n";
//	for(int i = 1;i <= q;i++)
//		cerr << ans[i] << " ";
//	cerr << "\n"; 
	for(int i = 1;i <= q;i++)
		printf(deep[ques[i].y] < ans[i] ? "NO\n" : "YES\n");
	return 0;
}
/*
10 0 10
2 1
3 1
4 3
5 2
6 3
7 5
8 2
9 5
10 7
1 1 0
2 1 3
3 1 2
4 1 2
5 1 2
6 1 4
7 1 4
8 1 3
9 1 2
10 1 4
*/
